package com.example.PullGame;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.Button;
import android.widget.ImageView;

import com.example.Resizablecontrol.ResizableImageView;
import com.example.wonderfulradish.R;

public class Pull_radish extends AppCompatActivity implements View.OnClickListener{

    Animation pullAnimation;
    ResizableImageView pullStartImage;
    ImageView textnote;
    private Button goplay;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_pull_radish);

        pullAnimation= AnimationUtils.loadAnimation(this,R.anim.select_anim);

        pullStartImage=(ResizableImageView)this.findViewById(R.id.pull_start_image);
        pullStartImage.startAnimation(pullAnimation);
        pullAnimation.setAnimationListener(new Animation.AnimationListener() {
            @Override
            public void onAnimationStart(Animation animation) {

            }

            @Override
            public void onAnimationEnd(Animation animation) {
                Intent intent=new Intent(Pull_radish.this,PullRadishSelect.class);
                startActivity(intent);
            }

            @Override
            public void onAnimationRepeat(Animation animation) {


            }
        });

        textnote=(ImageView) findViewById(R.id.text_note);
        textnote.startAnimation(pullAnimation);

        goplay=(Button) findViewById(R.id.go_play);
        goplay.setOnClickListener(this);
    }

    public void onClick(View v){
        switch (v.getId()){
            case R.id.go_play:
                Intent intent=new Intent(Pull_radish.this,PullRadishSelect.class);
                startActivity(intent);
                finish();
        }
    }
}
